let text = `<div>
	
</div>
<style>
	div {
		width: 1px;
	}
</style>`
let res = text.replace(/(?<=[0-9]{2,}|[2-9])px(?!\()/g, 'rpx')

console.log(res);

